home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds / gcore.man < prev    next >
Text File  |  1989-02-05  |  3KB  |  69 lines

  1. '\" Copyright 1989 Regents of the University of California
  2. '\" Permission to use, copy, modify, and distribute this
  3. '\" documentation for any purpose and without fee is hereby
  4. '\" granted, provided that this notice appears in all copies.
  5. '\" The University of California makes no representations about
  6. '\" the suitability of this material for any purpose.  It is
  7. '\" provided "as is" without express or implied warranty.
  8. '\" 
  9. '\" $Header: /a/newcmds/gcore/RCS/gcore.man,v 1.1 89/02/05 20:51:07 mendel Exp Locker: mendel $ SPRITE (Berkeley)
  10. '/" 
  11. .so \*(]ltmac.sprite
  12. .HS <GCORE> cmds
  13. .BS
  14. .SH NAME
  15. gcore \- Generate a core file from a Sprite process.
  16. .SH SYNOPSIS
  17. .nf
  18. \fBgcore\fR [\fIoptions\fR] \fIpid pid ...\fR
  19. .SH OPTIONS
  20. .IP "\fB\-o\fI prefix\fR" 10
  21. Generate the output file names by prepending the string 
  22. \fIprefix\fR to each of the pids.
  23. .IP "\fB\-k\fR"
  24. Kill the process after the core dump is produced.
  25. .IP "\fB\-s \fIsignal\fR"
  26. Use signal number \fIsignal\fR to pause running process.
  27. .BE
  28.  
  29. .SH DESCRIPTION
  30. .PP
  31. \fBGcore\fR generates a snapshot of the current execution state
  32. of a Sprite process.
  33. For historical reasons,
  34. these snapshot are referred to as core dumps or core files.
  35. Core dumps can be used by the \fBgdb\fR debugger to 
  36. examine the process's state as if the debugger was attached
  37. to the process.
  38. .LP
  39. \fBGcore\fR takes as arguments one or more process ids and 
  40. generates core dumps for each process in the file core.\fIpid\fR
  41. where \fIpid\fR is the specified process id.
  42. The \fB-o\fR option allows a string other than "core" to be
  43. used to generate output file names.
  44. If the \fB-k\fR option is specified, the processes specified will
  45. be sent a SIGKILL signal after the core dump is finished. 
  46. .LP
  47. \fBGcore\fR reads the register state and memory image of a
  48. process by using the Sprite debugger 
  49. interface (\fBProc_Debug\fR.) 
  50. If the process is not already in the DEBUG state (see the \fBps\fR command),
  51. \fBgcore\fR will send the process a SIGTRAP signal to force 
  52. it into the DEBUG state.  
  53. This operation will fail if the user does not have permission to 
  54. send signals to the process or the 
  55. process has blocked, ignored, or has a handler installed for the SIGTRAP signal.
  56. The \fB-s\fR option can be used to inform \fBgcore\fR
  57. to use a signal number other than 5 (SIGTRAP).
  58. Other signals that may work are 4 (SIGILL), 8 (SIGFPE) and 11 (SIGSEGV).
  59. \fBGcore\fR restarts running process by sending them a SIGCONT after
  60. the dump is produced.
  61. .SH WARNING
  62. The signals used by \fBgcore\fR  to stop running processes
  63. can interrupt system calls such 
  64. as \fBread, select\fR, or \fBsleep\fR, 
  65. causing them to return an error status of EINTR. 
  66. Some programs may interpret the EINTR as an error and exit.
  67. .SH KEYWORDS
  68. gdb, coredump
  69.